package com.iwhalecloud.bss.kite.cucc.service.attr.handler;

import com.iwhalecloud.bss.kite.common.util.KiteStringUtils;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteInst;
import com.iwhalecloud.bss.kite.service.attr.AttrData;
import com.iwhalecloud.bss.kite.service.attr.handler.AbstractAttrHandler;
import com.iwhalecloud.bss.kite.service.scene.attr.OperateInstAttrService;
import org.springframework.beans.factory.annotation.Autowired;

/** VPN名称 */
public class VPNNameAttrHandler extends AbstractAttrHandler<KiteInst, AttrData> {

  @Autowired OperateInstAttrService operateInstAttrService;

  @Override
  public void set(KiteAttr attr, KiteInst inst, String value, AttrData data) {
    super.set(attr, inst, value, data);

    // 联动修改VPN企业域名属性
    operateInstAttrService.setAttrValue(inst, "200004495", value, data.getSceneInstId(), null);
  }
}
